package com.common.domain;

/**
 * 配置响应返回值状态码 参数
 */
public enum ResultCode implements IErrorCode{

    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    NOPHNOR(101,"该手机号未注册"),
    NOTEINVALID(102,"验证码已过期");

    private int code;
    private String message;

    //枚举可以 传递参数
    private ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return this.code;
    }

    public String getMessage() {
        return this.message;
    }
}
